<template>
  <div>
 
        <van-tabs v-model="activeHtmlName" >
          <van-tab title="电脑端详情" name="0">
            <tinymce v-model="product.detailHtml" class="product-tinymce"></tinymce>
          </van-tab>
          <van-tab title="移动端详情" name="1">
            <tinymce v-model="product.detailMobileHtml" class="product-tinymce"></tinymce>
          </van-tab>
        </van-tabs>
  
      <van-goods-action>
        <van-button block type="primary" @click="onSubmit">保存</van-button>
      </van-goods-action>

  </div>
</template>
<script>
import Tinymce from "@/components/Tinymce";
import {
  creatProduct,
  updateProduct,
  productinfo,
  brandlist,
  categorylist
} from "@/api/product";
export default {
  name: "ProductAttrDetail",
  components: { Tinymce },
  props: {
    value: {
      type: Object,
      default: null
    }
  },
  watch: {
    value: {
      handler(newValue, oldValue) {
        this.product = newValue;
      },
      immediate: true
    }
  },
  data() {
    return {
      //商品富文本详情激活类型
      activeHtmlName: "1",
      product: {}
    };
  },
  methods: {
    onSubmit() {
    
      this.$emit("commit", this.product);
    }
  }
};
</script>
<style scoped>
.product-tinymce {

}
</style>